Optimal. Leaf size=92 \[ -\frac {(a+b)^2 \coth ^2(c+d x)}{2 d}-\frac {a (a+2 b) \coth ^4(c+d x)}{4 d}-\frac {a^2 \coth ^6(c+d x)}{6 d}+\frac {(a+b)^2 \log (\cosh (c+d x))}{d}+\frac {(a+b)^2 \log (\tanh (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 92, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3751, 457, 90}
\begin {gather*} -\frac {a^2 \coth ^6(c+d x)}{6 d}-\frac {a (a+2 b) \coth ^4(c+d x)}{4 d}-\frac {(a+b)^2 \coth ^2(c+d x)}{2 d}+\frac {(a+b)^2 \log (\tanh (c+d x))}{d}+\frac {(a+b)^2 \log (\cosh (c+d x))}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 90
Rule 457
Rule 3751
Rubi steps
\begin {align*} \int \coth ^7(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx &=\frac {\text {Subst}\left (\int \frac {\left (a+b x^2\right )^2}{x^7 \left (1-x^2\right )} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \frac {(a+b x)^2}{(1-x) x^4} \, dx,x,\tanh ^2(c+d x)\right )}{2 d}\\ &=\frac {\text {Subst}\left (\int \left (-\frac {(a+b)^2}{-1+x}+\frac {a^2}{x^4}+\frac {a (a+2 b)}{x^3}+\frac {(a+b)^2}{x^2}+\frac {(a+b)^2}{x}\right ) \, dx,x,\tanh ^2(c+d x)\right )}{2 d}\\ &=-\frac {(a+b)^2 \coth ^2(c+d x)}{2 d}-\frac {a (a+2 b) \coth ^4(c+d x)}{4 d}-\frac {a^2 \coth ^6(c+d x)}{6 d}+\frac {(a+b)^2 \log (\cosh (c+d x))}{d}+\frac {(a+b)^2 \log (\tanh (c+d x))}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.35, size = 74, normalized size = 0.80 \begin {gather*} -\frac {6 (a+b)^2 \coth ^2(c+d x)+3 a (a+2 b) \coth ^4(c+d x)+2 a^2 \coth ^6(c+d x)-12 (a+b)^2 (\log (\cosh (c+d x))+\log (\tanh (c+d x)))}{12 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.81, size = 102, normalized size = 1.11
method | result | size |
derivativedivides | \(\frac {a^{2} \left (\ln \left (\sinh \left (d x +c \right )\right )-\frac {\left (\coth ^{2}\left (d x +c \right )\right )}{2}-\frac {\left (\coth ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (\coth ^{6}\left (d x +c \right )\right )}{6}\right )+2 a b \left (\ln \left (\sinh \left (d x +c \right )\right )-\frac {\left (\coth ^{2}\left (d x +c \right )\right )}{2}-\frac {\left (\coth ^{4}\left (d x +c \right )\right )}{4}\right )+b^{2} \left (\ln \left (\sinh \left (d x +c \right )\right )-\frac {\left (\coth ^{2}\left (d x +c \right )\right )}{2}\right )}{d}\) | \(102\) |
default | \(\frac {a^{2} \left (\ln \left (\sinh \left (d x +c \right )\right )-\frac {\left (\coth ^{2}\left (d x +c \right )\right )}{2}-\frac {\left (\coth ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (\coth ^{6}\left (d x +c \right )\right )}{6}\right )+2 a b \left (\ln \left (\sinh \left (d x +c \right )\right )-\frac {\left (\coth ^{2}\left (d x +c \right )\right )}{2}-\frac {\left (\coth ^{4}\left (d x +c \right )\right )}{4}\right )+b^{2} \left (\ln \left (\sinh \left (d x +c \right )\right )-\frac {\left (\coth ^{2}\left (d x +c \right )\right )}{2}\right )}{d}\) | \(102\) |
risch | \(-a^{2} x -2 a b x -b^{2} x -\frac {2 a^{2} c}{d}-\frac {4 a b c}{d}-\frac {2 b^{2} c}{d}-\frac {2 \,{\mathrm e}^{2 d x +2 c} \left (9 a^{2} {\mathrm e}^{8 d x +8 c}+12 a b \,{\mathrm e}^{8 d x +8 c}+3 b^{2} {\mathrm e}^{8 d x +8 c}-18 a^{2} {\mathrm e}^{6 d x +6 c}-36 a b \,{\mathrm e}^{6 d x +6 c}-12 b^{2} {\mathrm e}^{6 d x +6 c}+34 a^{2} {\mathrm e}^{4 d x +4 c}+48 a b \,{\mathrm e}^{4 d x +4 c}+18 b^{2} {\mathrm e}^{4 d x +4 c}-18 a^{2} {\mathrm e}^{2 d x +2 c}-36 a b \,{\mathrm e}^{2 d x +2 c}-12 b^{2} {\mathrm e}^{2 d x +2 c}+9 a^{2}+12 a b +3 b^{2}\right )}{3 d \left ({\mathrm e}^{2 d x +2 c}-1\right )^{6}}+\frac {a^{2} \ln \left ({\mathrm e}^{2 d x +2 c}-1\right )}{d}+\frac {2 a \ln \left ({\mathrm e}^{2 d x +2 c}-1\right ) b}{d}+\frac {\ln \left ({\mathrm e}^{2 d x +2 c}-1\right ) b^{2}}{d}\) | \(308\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 390 vs.
\(2 (86) = 172\).
time = 0.28, size = 390, normalized size = 4.24 \begin {gather*} \frac {1}{3} \, a^{2} {\left (3 \, x + \frac {3 \, c}{d} + \frac {3 \, \log \left (e^{\left (-d x - c\right )} + 1\right )}{d} + \frac {3 \, \log \left (e^{\left (-d x - c\right )} - 1\right )}{d} + \frac {2 \, {\left (9 \, e^{\left (-2 \, d x - 2 \, c\right )} - 18 \, e^{\left (-4 \, d x - 4 \, c\right )} + 34 \, e^{\left (-6 \, d x - 6 \, c\right )} - 18 \, e^{\left (-8 \, d x - 8 \, c\right )} + 9 \, e^{\left (-10 \, d x - 10 \, c\right )}\right )}}{d {\left (6 \, e^{\left (-2 \, d x - 2 \, c\right )} - 15 \, e^{\left (-4 \, d x - 4 \, c\right )} + 20 \, e^{\left (-6 \, d x - 6 \, c\right )} - 15 \, e^{\left (-8 \, d x - 8 \, c\right )} + 6 \, e^{\left (-10 \, d x - 10 \, c\right )} - e^{\left (-12 \, d x - 12 \, c\right )} - 1\right )}}\right )} + 2 \, a b {\left (x + \frac {c}{d} + \frac {\log \left (e^{\left (-d x - c\right )} + 1\right )}{d} + \frac {\log \left (e^{\left (-d x - c\right )} - 1\right )}{d} + \frac {4 \, {\left (e^{\left (-2 \, d x - 2 \, c\right )} - e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )}\right )}}{d {\left (4 \, e^{\left (-2 \, d x - 2 \, c\right )} - 6 \, e^{\left (-4 \, d x - 4 \, c\right )} + 4 \, e^{\left (-6 \, d x - 6 \, c\right )} - e^{\left (-8 \, d x - 8 \, c\right )} - 1\right )}}\right )} + b^{2} {\left (x + \frac {c}{d} + \frac {\log \left (e^{\left (-d x - c\right )} + 1\right )}{d} + \frac {\log \left (e^{\left (-d x - c\right )} - 1\right )}{d} + \frac {2 \, e^{\left (-2 \, d x - 2 \, c\right )}}{d {\left (2 \, e^{\left (-2 \, d x - 2 \, c\right )} - e^{\left (-4 \, d x - 4 \, c\right )} - 1\right )}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 3454 vs.
\(2 (86) = 172\).
time = 0.39, size = 3454, normalized size = 37.54 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 192 vs.
\(2 (86) = 172\).
time = 0.56, size = 192, normalized size = 2.09 \begin {gather*} -\frac {3 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} {\left (d x + c\right )} - 3 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \log \left ({\left | e^{\left (2 \, d x + 2 \, c\right )} - 1 \right |}\right ) + \frac {2 \, {\left (3 \, {\left (3 \, a^{2} + 4 \, a b + b^{2}\right )} e^{\left (10 \, d x + 10 \, c\right )} - 6 \, {\left (3 \, a^{2} + 6 \, a b + 2 \, b^{2}\right )} e^{\left (8 \, d x + 8 \, c\right )} + 2 \, {\left (17 \, a^{2} + 24 \, a b + 9 \, b^{2}\right )} e^{\left (6 \, d x + 6 \, c\right )} - 6 \, {\left (3 \, a^{2} + 6 \, a b + 2 \, b^{2}\right )} e^{\left (4 \, d x + 4 \, c\right )} + 3 \, {\left (3 \, a^{2} + 4 \, a b + b^{2}\right )} e^{\left (2 \, d x + 2 \, c\right )}\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )}^{6}}}{3 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.27, size = 362, normalized size = 3.93 \begin {gather*} \frac {\ln \left ({\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}-1\right )\,\left (a^2+2\,a\,b+b^2\right )}{d}-\frac {2\,\left (3\,a^2+4\,a\,b+b^2\right )}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}-1\right )}-\frac {32\,a^2}{3\,d\,\left (15\,{\mathrm {e}}^{4\,c+4\,d\,x}-6\,{\mathrm {e}}^{2\,c+2\,d\,x}-20\,{\mathrm {e}}^{6\,c+6\,d\,x}+15\,{\mathrm {e}}^{8\,c+8\,d\,x}-6\,{\mathrm {e}}^{10\,c+10\,d\,x}+{\mathrm {e}}^{12\,c+12\,d\,x}+1\right )}-x\,{\left (a+b\right )}^2-\frac {2\,\left (9\,a^2+8\,a\,b+b^2\right )}{d\,\left ({\mathrm {e}}^{4\,c+4\,d\,x}-2\,{\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}-\frac {8\,\left (13\,a^2+6\,b\,a\right )}{3\,d\,\left (3\,{\mathrm {e}}^{2\,c+2\,d\,x}-3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}-1\right )}-\frac {4\,\left (11\,a^2+2\,b\,a\right )}{d\,\left (6\,{\mathrm {e}}^{4\,c+4\,d\,x}-4\,{\mathrm {e}}^{2\,c+2\,d\,x}-4\,{\mathrm {e}}^{6\,c+6\,d\,x}+{\mathrm {e}}^{8\,c+8\,d\,x}+1\right )}-\frac {32\,a^2}{d\,\left (5\,{\mathrm {e}}^{2\,c+2\,d\,x}-10\,{\mathrm {e}}^{4\,c+4\,d\,x}+10\,{\mathrm {e}}^{6\,c+6\,d\,x}-5\,{\mathrm {e}}^{8\,c+8\,d\,x}+{\mathrm {e}}^{10\,c+10\,d\,x}-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________